#include "title.h"

model::title::title(const model::dom &node)
{
	parse(node);
}

void model::title::parse(const model::dom &node)
{
	_title = node.find_attrib("name");
	_filename = node.find_attrib("file");
	stringstream ss;
	ss.str(node.find_attrib("duration"));
	ss >> _duration;
}

void model::title::print() const
{
	cout << "Title: " << _title << " Filename: " << _filename 
		<< " Duration: " << _duration << endl;
}

